// 设置 localStorage 值
export function setStorageItem(key, value) {
    localStorage.setItem(key, JSON.stringify(value));
}

// 获取 localStorage 值
export function getStorageItem(key) {
    const item = localStorage.getItem(key);
    return item ? JSON.parse(item) : null;
}

// 清除指定的 localStorage 值
export function removeStorageItem(key) {
    localStorage.removeItem(key);
}

// 清除所有的 localStorage 值
export function clearStorage() {
    localStorage.clear();
}
